{% extends "admin_base.html" %}

{% block title %}Find a Server{% endblock %}

{% block content %}
<div class="col-9">
	{% if error != null %}<div class="alert alert-danger">{{ error }}</div>{% endif %}
	<div class="tab-pane" id="list_all">
		<h3>All Servers</h3><hr />
		<table class="table table-striped table-bordered table-hover">
			<thead>
				<tr>
					<th style="width:2%"></th>
					<th>Server Name</th>
					<th>Node</th>
					<th>Connection Address</th>
					<th>Owner Information</th>
					<th></th>
				</tr>
			</thead>
			<tbody>
				{% for server in servers %}
					<tr>
						<td><a href="../../servers.php?goto={{ server.hash }}"><i class="fa fa-tachometer"></i></a></td>
						<td><a href="view.php?id={{ server.id }}">{{ server.name }}</a></td>
						<td><a href="../node/view.php?id={{ server.node }}">{{ server.node_name }}</a></td>
						<td>{{ server.server_ip }}:{{ server.server_port }}</td>
						<td><a href="../account/view.php?id={{ server.owner_id }}">{{ server.user_email }}</a></td>
						<td style="text-align:center;">{% if server.active == 1 %}<span class="label label-success">Enabled</span>{% else %}<span class="label label-danger">Disabled</span>{% endif %}</td>
					</tr>
				{% endfor %}
			</tbody>
		</table>
	</div>
</div>
{% endblock %}